package com.xmy.cultivate.service.impl;

import com.xmy.cultivate.entity.RecordCourse;
import com.xmy.cultivate.mapper.RecordCourseMapper;
import com.xmy.cultivate.service.IRecordCourseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 记上课 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2023-08-17
 */
@Service
public class RecordCourseServiceImpl extends ServiceImpl<RecordCourseMapper, RecordCourse> implements IRecordCourseService {
    @Autowired
    RecordCourseMapper recordCourseMapper;

    @Override
    public String getYetLessonNumStr(Integer yearPart,
                                     Integer quarterNum,
                                     Long subjectsId,
                                     Integer lessonType,
                                     Long studentId,
                                     String dateTimeNow
    ){
        return recordCourseMapper.getYetLessonNumStr(yearPart,quarterNum,subjectsId,lessonType,studentId,dateTimeNow);
    }

    @Override
    public Integer getNotPassCount(Integer yearPart,
                                   Integer quarterNum,
                                   Long studentId,
                                   String nowLocalDate,
                                   String startDateTime
    ){
        return recordCourseMapper.getNotPassCount(yearPart,quarterNum,studentId,nowLocalDate,startDateTime);
    }
}
